import axios from "@/api/config"
import {baseURL} from "@/api/ipconfig"
var ip = baseURL.URL2
export async function getMapData(mapName) {
    var mapJson = {
            'zhongguo':"/data/get/s/data-china.json",
            'shanghai':"/data/get/s/data-shanghai.json",
            'hebei':"/data/get/s/data-hebei.json",
            'shangxi':"/data/get/s/data-shangxi.json",
            'neimenggu':"/data/get/s/data-neimenggu.json",
            'liaoning':"/data/get/s/data-liaoning.json",
            'jilin':"/data/get/s/data-jilin.json",
            'heilongjiang':"/data/get/s/data-heilongjiang.json",
            'jiangsu':"/data/get/s/data-jiangsu.json",
            'zhejiang':"/data/get/s/data-zhejiang.json",
            'anhui':"/data/get/s/data-anhui.json",
            'fujian':"/data/get/s/data-fujian.json",
            'jiangxi':"/data/get/s/data-jiangxi.json",
            'shangdong':"/data/get/s/data-shangdong.json",
            'henan':"/data/get/s/data-henan.json",
            'hubei':"/data/get/s/data-hubei.json",
            'hunan':"/data/get/s/data-hunan.json",
            'guangdong':"/data/get/s/data-guangdong.json",
            'guangxi':"/data/get/s/data-guangxi.json",
            'hainan':"/data/get/s/data-hainan.json",
            'sichuan':"/data/get/s/data-sichuan.json",
            'guizhou':"/data/get/s/data-guizhou.json",
            'yunnan':"/data/get/s/data-yunnan.json",
            'xizang':"/data/get/s/data-xizang.json",
            'shanxi':"/data/get/s/data-shanxi.json",
            'gansu':"/data/get/s/data-gansu.json",
            'qinghai':"/data/get/s/data-qinghai.json",
            'ningxia':"/data/get/s/data-ningxia.json",
            'xinjiang':"/data/get/s/data-xinjiang.json",
            'beijing':"/data/get/s/data-beijing.json",
            'tianjin':"/data/get/s/data-tianjin.json",
            'chongqing':"/data/get/s/data-chongqing.json",
            'xianggang':"/data/get/s/data-xianggang.json",
            'aomen':"/data/get/s/data-aomen.json"
        }
    const url = mapJson[mapName];
    console.log(ip+url)
    const res = await axios.get(ip+url);
    return res.data;
}


